//
//  DYJQWentiCell.swift
//  SheYangBigData
//
//  Created by 叁拾叁 on 2021/2/4.
//  Copyright © 2021 叁拾叁. All rights reserved.
//

import UIKit
import YYText

class DYJQWentiCell: SYBaseCell {

    var bgView: UIView = {
        let v: UIView = UIView()
        v.backgroundColor = .white
        v.layer.cornerRadius = 5
        v.layer.masksToBounds = true
        return v
    }()
    
    let wenti: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x333333)
        v.font = 18.autoBoldFontSize()
        v.text  = "遇到下列问题"
        return v
    }()
    
    let note: DYMSWentiView = {
        let v = DYMSWentiView()
        
        return v
    }()

    
    func configure(_ model: RYDingdanModel) {
        
    }
    
    func configure(_ model: DYMSDaiquerenModel) {
        
    }

    override func initViews() {
        let titles = ["忘带身份证", "学生票适用人群…", "如何入园", "费用包含", "儿童没有身份证", "游玩攻略查询"]
        let height = note.initViews(texts: titles.map { return "  \($0)  " })
        
        self.backgroundColor = .clear
        addSubview(bgView)
        bgView.addSubview(wenti)
        
        bgView.addSubview(lineView)
        bgView.addSubview(note)
        
        wenti.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(20.autoWidth())
            make.left.equalToSuperview().offset(10.autoWidth())
            make.height.equalTo(18.autoWidth())
        }

      
        lineView.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(53.autoWidth())
            make.left.equalToSuperview().offset(10.autoWidth())
            make.right.equalToSuperview().offset(-10.autoWidth())
            make.height.equalTo(0.5.autoWidth())
        }
        
        bgView.snp.makeConstraints { (make) in
            make.top.equalToSuperview()
            make.bottom.equalToSuperview().offset(-10.autoWidth())
            make.left.equalToSuperview()
            make.right.equalToSuperview()
        }
        note.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(70.autoWidth())
            make.bottom.equalToSuperview().offset(-20.autoWidth())
            make.left.equalToSuperview()
            make.right.equalToSuperview()
            make.height.equalTo(height)
        }
    }
}




// MARK: -DYJQDetailCell

class DYJQDetailCell: SYBaseCell {

    var bgView: UIView = {
        let v: UIView = UIView()
        v.backgroundColor = .white
        v.layer.cornerRadius = 5
        v.layer.masksToBounds = true
        return v
    }()
    
    let wenti: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x333333)
        v.font = 18.autoBoldFontSize()
        v.text  = "六合龙池湖景区"
        return v
    }()
    

    var tixianBt: UIButton = {
        let v = UIButton()
        v.setTitle("景点详情 >", for: .normal)
        v.setTitleColor(UIColor(hex: 0x666666), for: .normal)
        v.titleLabel?.font = 14.autoFontSize()
        return v
    }()
    
    
    func configure(_ model: RYDingdanModel) {
        
    }

    override func initViews() {
        
        self.backgroundColor = .clear
        addSubview(bgView)
        bgView.addSubview(wenti)
        bgView.addSubview(tixianBt)
        bgView.addSubview(lineView)
        
        
        wenti.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(20.autoWidth())
            make.left.equalToSuperview().offset(10.autoWidth())
            make.height.equalTo(18.autoWidth())
            make.bottom.equalToSuperview().offset(-20.autoWidth())
        }

        
        bgView.snp.makeConstraints { (make) in
            make.top.equalToSuperview()
            make.bottom.equalToSuperview().offset(-10.autoWidth())
            make.left.equalToSuperview()
            make.right.equalToSuperview()
        }
        tixianBt.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(20.autoWidth())
            make.right.equalToSuperview().offset(-10.autoWidth())
            make.height.equalTo(18.autoWidth())
            make.bottom.equalToSuperview().offset(-20.autoWidth())
        }
    }
}
